package com.huawei.appmarket.framework.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.huawei.appgallery.foundation.ui.framework.widget.FixViewPager;
import o.dky.o;

public class CustomViewPager extends FixViewPager {
    private boolean ˊ = true;
    private boolean ˋ = true;

    public CustomViewPager(Context context) {
        super(context);
    }

    public CustomViewPager(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        ˎ(context, attributeSet);
    }

    private void ˎ(Context context, AttributeSet attributeSet) {
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, o.ʽʼ);
        this.ˊ = obtainStyledAttributes.getBoolean(o.ʽʻ, true);
        this.ˋ = obtainStyledAttributes.getBoolean(o.ʼʽ, true);
        obtainStyledAttributes.recycle();
    }

    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        if (this.ˊ) {
            return super.onInterceptTouchEvent(motionEvent);
        }
        return false;
    }

    public boolean onTouchEvent(MotionEvent motionEvent) {
        if (this.ˊ) {
            return super.onTouchEvent(motionEvent);
        }
        return false;
    }

    public void setCurrentItem(int i) {
        super.setCurrentItem(i, this.ˋ);
    }

    public void onMeasure(int i, int i2) {
        for (int i3 = 0; i3 < getChildCount(); i3++) {
            getChildAt(i3).measure(i, i2);
        }
        super.onMeasure(i, i2);
    }
}
